#import "Common.h"
#import "InvaderManager.h"

@implementation InvaderManager

@synthesize batch = mBatch;

-(id)init
{
	if ((self = [super init]))
	{
		CCTexture2D* tex = [[CCTextureCache sharedTextureCache] addImage:
												[NSString stringWithFormat:@"invaders%@.png", gHDSuffix]];
		mBatch = [CCSpriteBatchNode batchNodeWithTexture:tex];
		[self addChild:mBatch];
	}
	return self;
}

-(void)addNew:(InvaderType)type
{
	InvaderBase* invader = [[InvaderBase alloc] initWithType:type batch:mBatch];
	[invader fire];
}

@end
